package com.atguigu.springcloud.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

@Configuration
public class ApplicationContextConfig {

    @Bean
//    @LoadBalanced//开启负载均衡,默认是[轮询]的负载均衡方式
    public RestTemplate getRestTemplate(){
        return new RestTemplate();
    }
    //Bean注解相当于ApplicationContext.xml  <bean id="" class=""/>
}
